package cn.walls1717.wallsmall.member.service;

import cn.walls1717.wallsmall.member.vo.MemberLoginVO;
import cn.walls1717.wallsmall.member.vo.MemberRegisterVO;
import cn.walls1717.wallsmall.member.vo.SocialUserVO;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.walls1717.wallsmall.common.utils.PageUtils;
import cn.walls1717.wallsmall.member.entity.MemberEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 会员
 *
 * @author walls1717
 * @email walls1717@163.com
 * @date 2022-10-21 13:14:34
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 保存用户信息
     *
     * @param registerVO 注册数据
     */
    void saveMember(MemberRegisterVO registerVO);

    /**
     * 根据用户名与密码获取用户信息
     *
     * @param loginVO 用户名，密码
     * @return 用户信息
     */
    MemberEntity getMemberByNameAndPassword(MemberLoginVO loginVO);

    /**
     * 第三方登录
     *
     * @param loginVO 登录参数
     * @return 结果
     */
    MemberEntity socialLogin(SocialUserVO loginVO) throws ExecutionException, InterruptedException;
}

